package com.zksk.mbg.admin.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zksk.common.core.web.domain.BaseEntity;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 * <p>
 * 用户开票记录表
 * </p>
 *
 * @author Zksk Acmen
 * @since 2022-12-30
 */
@Data
@Accessors(chain = true)
@TableName("platform_fact_member_invoice_record")
@ApiModel(value = "MemberInvoiceRecord对象", description = "用户开票记录表")
public class MemberInvoiceRecord extends BaseEntity {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("订单id")
    @TableField("orders_id")
    private Long ordersId;

    @ApiModelProperty("用户编号")
    @TableField("member_id")
    private Long memberId;

    @ApiModelProperty("开票时间")
    @TableField("invoice_time")
    private LocalDateTime invoiceTime;

    @ApiModelProperty("纳税人识别号")
    @TableField("t_r_number")
    private String tRNumber;

    @ApiModelProperty("企业地址")
    @TableField("address")
    private String address;

    @ApiModelProperty("企业电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty("开户行名称")
    @TableField("open_bank")
    private String openBank;

    @ApiModelProperty("开户行账号")
    @TableField("bank_account")
    private String bankAccount;

    @ApiModelProperty("电子邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("收件人")
    @TableField("recipient")
    private String recipient;

    @ApiModelProperty("收件人联系电话")
    @TableField("recipient_phone")
    private String recipientPhone;

    @ApiModelProperty("收件人地址")
    @TableField("recipient_addr")
    private String recipientAddr;

    @ApiModelProperty("开票方式")
    @TableField("`type`")
    private String type;

    @ApiModelProperty("发票金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty("发票类型")
    @TableField("invoice_type")
    private String invoiceType;

    @ApiModelProperty("发票状态（0已邮寄，1已发送）")
    @TableField("invoice_status")
    private Integer invoiceStatus;

    @ApiModelProperty("开票状态（0已开票，1开票中，2已申请）")
    @TableField("`status`")
    private Integer status;

    @ApiModelProperty("删除标识（0 正常 2删除）")
    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer delFlag;


    public static final String ID = "id";

    public static final String ORDERS_ID = "orders_id";

    public static final String MEMBER_ID = "member_id";

    public static final String INVOICE_TIME = "invoice_time";

    public static final String T_R_NUMBER = "t_r_number";

    public static final String ADDRESS = "address";

    public static final String PHONE = "phone";

    public static final String OPEN_BANK = "open_bank";

    public static final String BANK_ACCOUNT = "bank_account";

    public static final String EMAIL = "email";

    public static final String RECIPIENT = "recipient";

    public static final String RECIPIENT_PHONE = "recipient_phone";

    public static final String RECIPIENT_ADDR = "recipient_addr";

    public static final String TYPE = "type";

    public static final String AMOUNT = "amount";

    public static final String INVOICE_TYPE = "invoice_type";

    public static final String INVOICE_STATUS = "invoice_status";

    public static final String STATUS = "status";

    public static final String DEL_FLAG = "del_flag";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
